-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix notifications on list of primitive mixed #4770
Conversation
There are a bunch of things in the DeepChangeChecker tests in transaction_log_parsing.cpp which should be copied to also test this scenario. |
if (value.is_type(type_TypedLink)) { | ||
auto link = value.get_link(); | ||
if (!link.is_unresolved()) { | ||
if (!cached_linked_table || cached_linked_table->get_key() != link.get_table_key()) { | ||
cached_linked_table = coll->get_table()->get_parent_group()->get_table(link.get_table_key()); | ||
REALM_ASSERT_EX(cached_linked_table, link.get_table_key().value); | ||
} | ||
return this->check_row(*cached_linked_table, link.get_obj_key().value, depth + 1); | ||
} | ||
} | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this part of the function is shared between list/set/dictionary and could be extracted to a templated function?
c79c340
to
8b67efd
Compare
Can you have a look at #4646 ? I changed the |
I think it would be fair if #4646 is merged first - assuming this can be done soon. |
Looks like we will be doing another v11 release before merging things to master so I will get this in now so it can be included in that. |
We forgot to handle list of Mixed when checking for deep changes in the notification logic.
It's the same code as Set so I extracted it to a templated method. It couldn't be generalized to work on a CollectionBase pointer because this base class doesn't have an iterator interface at that level, and unfortunately it is not trivial to add.
Reported by #4767
☑️ ToDos